//
//  HWGameCommunityModel.swift
//  HWanGame
//
//  Created by 王昌健 on 2022/10/18.
//  Copyright © 2022 94Wan. All rights reserved.
//

import UIKit
import HandyJSON
class HWGameCommunityModel: HandyJSON  {
    required init() {}
    
    /// 背景
    var bgimg = ""
    /// 分类
    var fenlei:[HWGameCommunityFenLeiModel] = []
    /// 关注量
    var guanzhu_num = ""
    /// 图标
    var icon = ""
    /// 是否关注
    var is_guanzhu = false
    /// 名称
    var name = ""
    /// 最新发布时间
    var new_time = ""
    /// 新闻
    var news:[HWGameCommunityNewsModel] = []
    
}

class HWGameCommunityFenLeiModel: HandyJSON  {
    required init() {}
    
    var name = ""
    var type = ""
}

class HWGameCommunityNewsModel: HandyJSON  {
    required init() {}
    
    /// 分类ID
    var class_id = ""
    /// id
    var id = ""
    /// 名称
    var title = ""
    /// 分类
    var type = ""
}

class HWGameCommunityListModel: HandyJSON {
    required init() {}
    
    /// 文章ID
    var id = ""
    /// 标题
    var title = ""
    /// 内容
    var content = ""
    /// 发布时间
    var time = ""
    /// 点赞量
    var good = ""
    /// 查看量
    var look = ""
    /// 图片
    var image:[String] = []
    /// 视频  优先判断 为空时再看图片
    var video = ""
    /// 最后回复时间
    var last_time = ""
    /// 发布人
    var fabu = ""
    /// 头像
    var face = ""
    /// 标签
    var biaoqian = ""
    /// 优质帖子图片
    var jiajing_img = ""
    /// 是否允许删除
    var del = false
    /// 社区ID
    var pid = ""
    /// 是否点赞
    var is_good = false
    /// 是否评论
    var is_pinglun = false
    /// 是否加精  加精显示 加精图片
    var is_jiajing = false
    /// 分类名称，优先显示加精 置顶
    var className = ""
    /// 是否置顶
    var is_best = false
    /// 评论数
    var pinglun = ""
    
    func mapping(mapper: HelpingMapper) {
        mapper <<<
            self.className <-- "class"
    }
}

@objc class HWGameCommunityDetailModel: NSObject,HandyJSON  {
    required override init() {}
    
    /// 文章ID
    @objc var id = ""
    /// 标题
    var title = ""
    /// 发布人uid
    @objc var uid = ""
    /// 类型ID
    var class_id = ""
    /// 类型名称
    var className = ""
    /// 社区ID
    var pid = ""
    /// 图片 数组
    @objc var image:[String] = []
    /// 排序
    var sort = ""
    /// 发布时间
    var time = ""
    /// 最后回复时间
    var last_time = ""
    /// 是否置顶
    var is_best = false
    /// 是否加精
    var is_jiajing = false
    /// 是否点赞
    var is_good = false
    /// 视频
    @objc var video = ""
    /// 内容 base64
    @objc var content = ""
    /// 点赞量
    var good = ""
    /// 查看量
    var look = ""
    var status = ""
    /// 发布人
    var fabu = ""
    /// 头像
    var face = ""
    /// 标签
    var biaoqian = ""
    /// 优质图片
    var jiajing_img = ""
    /// 评论数
    var pinglun = ""
    
    func mapping(mapper: HelpingMapper) {
        mapper <<<
            self.className <-- "class"
    }
}

@objc class HWGameCommunityDetailCommentModel: NSObject,HandyJSON  {
    required override init() {}
    /// 评论id
    @objc var hid = ""
    /// 评论用户uid
    @objc var uid = ""
    /// 文章id
    @objc var pid = ""
    /// 文章发布者
    @objc var puid = ""
    var type = ""
    /// 评论内容
    @objc var content = ""
    /// 点赞量
    var good = ""
    /// 回复时间
    @objc var time = ""
    var status = ""
    /// 昵称
    @objc var pet_name = ""
    /// 头像
    var face = ""
    /// 是否点赞
    var is_good = false
    
    /// 被回复人
    var p_pet_name = ""
    
    @objc var list:[HWGameCommunityDetailCommentModel] = []
    
    func mapping(mapper: HelpingMapper) {
        mapper <<<
            self.hid <-- "id"
    }
}


class HWGameCommunityReleaseModel: HandyJSON  {
    required init() {}
    var title = ""
    var content = ""
    /// 分类   2攻略  4问题
    var type = "2"
    var image = ""
}

class HWGameCommunityAllListModel: HandyJSON  {
    required init() {}
    var id = ""
    /// 社区名称
    var name = ""
    /// 游戏ID
    var gid = ""
    /// 简介
    var content = ""
    /// 图标
    var icon = ""
    /// 背景图
    var bgimg = ""
    /// 创建时间
    var create_time = ""
    /// 阅读量
    var look = ""
    /// 关注人数
    var guanzhu_num = ""
    var sort = ""
    var status = ""
    /// 是否关注
    var is_guanzhu = false
    /// 最新话题：
    var text = ""
    /// 是否选中
    var isSel = false
    /// bendi
    var isLocal = false
}

class HWGameCommunityReplyMessageModel: HandyJSON  {
    required init() {}
    /// 回复时使用
    var pid = ""
    /// 回复内容
    var content = ""
    /// 时间
    var time = ""
    /// 头像
    var face = ""
    /// 昵称
    var pet_name = ""
    /// 标题
    var title = ""
    /// 是否置顶
    var is_best = false
    /// 是否加精
    var is_jiajing = false
    /// 是否有视频
    var video = ""
    /// 文章ID 用于跳转到文章
    var news_id = ""
    
}
